Skip to content

Promote develop to main: the crowd and forest world run faster in the engine (#659) - #665

Merged
jonit-dev merged 4 commits into
mainfrom
develop
Nov 12, 2026
Merged

jonit-dev merged 4 commits into
mainfrom
develop

Conversation

@jonit-dev

Copy link
Copy Markdown
Contributor

What is this PR about?

It promotes develop to main. The one new thing on develop is the squash of #659 (which carried #663): the owned engine now draws a walking crowd and a forest world with less CPU work per frame. PRD-871, 872, 875, 876, 877, 878 and 879 are done.

Why does it matter?

Measured in a fair window (ABBA, 0 void, RTX 2080) on the stress lab: the ?stress frame p50 fell from 9.22 to 7.75 ms (-16%), p95 from 11.50 to 10.60 ms, and the per-frame GPU upload from 1,191 to 638 KB. The forest playtest exits 0 three times in a row. Fresh visual judges read NEUTRAL on the walkers and the forest.

What is still red? (owner: bypass CI on #659, solve it here)

#659 merged with its required checks bypassed. Known state at the merge:

  • budgets: the native coverage report is stale. Regenerating it needs the full native host build with Skia (about 30 minutes); the regenerated report goes onto develop before this merges.
  • Web engine size budget raised from 4 MiB + 64 KiB to 4 MiB + 128 KiB (the engine grew 0.7%); PRD-881 carries the reclaim.
  • Everything else that ran passed on the last full run: lint, typecheck, test-unit, test, build-artifacts, golden-path, supply-chain. The merged tree was not run on CI.

Still open after this PR

  • PRD-881 (the crowd's engine stages to 2.5 ms, planVirtualPages to 0.5 ms; now 3.70 ms and 0.79-0.89 ms).
  • PRD-882 (the world drain in the engine, the desktop forest run).

Merge with a merge commit, never squash (repo rule for main).

jonit-dev and others added 3 commits November 11, 2026 18:20
…n the engine (PRD-871/872/875-879; #659, #663)

Squash of PR 659 (which carries PR 663). Merged with the required checks bypassed at the owner's request; the open reds (stale native coverage report, web wasm budget raised to 4 MiB + 128 KiB) are fixed on the develop to main PR.

Done: PRD-871, 872, 875, 876, 877, 878, 879. Measured (fair window fwfinal, ABBA, RTX 2080): ?stress frame p50 9.22 to 7.75 ms (-16%), p95 11.50 to 10.60, GPU upload 1191 to 638 KB a frame. PRD-878 and PRD-879 closed at their measured values; the open bars moved to PRD-881 and PRD-882.
…[skip ci]

Squashed from #664 at the owner's request, skipping CI. Lands the whole PRD:
one W3C standard mapping for every backend, so a game binds standard indices
and nothing else — `buttons: [0]` is the south face button on an Xbox pad, an
8BitDo and a Steam Deck.

core
- `gamepad-mappings.ts` (new): a pad the browser reports `mapping: "standard"`
  passes through; one reporting `""` is normalized from one SDL_GameControllerDB
  row per vendor:product, parsed once and cached per id; a pad no row knows is
  `unmapped` and ignored rather than read with raw indices. Four rows ship: the
  three SDL 8BitDo/Steam Deck entries, plus a measured row for the owner's
  `2dc8:3016` (SDL has none and Chromium reports it unmapped).
- `InputMap` owns the two conventions every game repeated: a radial dead zone
  (0.2, the stock Enhanced Input value, rescaled so full tilt is still 1) on both
  stick pairs, and a claim rule for which pad is read — a button press or a stick
  past half tilt claims it, the pad keeps it while idle so releases read, and a
  resting or jittering stick claims nothing. `TN_GAMEPAD` reports one line per
  connect with the id, the normalizer and the dead zone.
- `defineGame({ gamepadDeadZone })` is the named override; an out-of-range value
  throws at construction, `0` publishes raw axes.

runtime-native
- One `fillStandardPad` in `src/platform/input.cpp` replaces the two tables that
  disagreed about axes and buttons; the legacy host and the owned engine player
  now both report 4 axes and 16 buttons with the triggers as 6 and 7.

playtest
- A `gamepad` step scripts a standard pad through `navigator.getGamepads`,
  announces it as a real pad does, survives a startup reload, and refuses the
  scenario by name on lanes that cannot install one.

search and conventions
- `InputMap` carries the controller aliases, situations, constraints and the
  override; the `gamepad` convention row renders into every kit's AGENTS.md.

Proofs: input.spec.ts (dead zone, claim rule, four device rows), ctest
gamepad_standard (both entry points identical for one virtual pad),
search.spec.ts, kit-conventions.spec.ts, the platformer kit driven in a browser
by both new scenarios (x delta 28.87, jumps 0 -> 1, 0 movement at a 0.1 stick),
and the owner's physical 8BitDo read — its browser now logs
`TN_GAMEPAD {… "mapping":"table"}` and a left-stick push reads `move: [0, -1]`.

Reviewed by an independent gate over ten rounds; final `VERDICT: AUTHORIZE`.
PRD filed under `docs/PRDs/BLOCKED/requires-physical-device/` for the remaining
owner read (an official Xbox pad and a Steam Deck).
@jonit-dev
jonit-dev merged commit af1b780 into main Nov 12, 2026
10 of 13 checks passed
jonit-dev added a commit that referenced this pull request Nov 12, 2026
…ng any work

main received #665 (develop -> main) at 19:09 today, before it was meant to be
promoted. develop already holds every commit of it — the merge brings main's own
history (the promotion merge commits and the release commit) back into develop so
the two are one line again, without rewriting anything or dropping a single
commit.

[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant